package com.pro.entity;
/*
    赵自强
    2021/11/4
    课程分类
*/
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class CourseClass {

    private Integer id;//id
    private String title;//标签标题
    private Integer type;//分类状态
    private Integer sort;//排序
    private Integer parentId;//上级分类id 0微最高 1微二级
    private String createId;//创建人
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;//创建时间
    private String updateId;//更新人
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateDate;//更新时间
    private String remarks;//备注

    private List<CourseClass> children = new ArrayList<>();//下级元素

    public CourseClass() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdateId() {
        return updateId;
    }

    public void setUpdateId(String updateId) {
        this.updateId = updateId;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public List<CourseClass> getChildren() {
        return children;
    }

    public void setChildren(List<CourseClass> children) {
        this.children = children;
    }

    public CourseClass(Integer id, String title, Integer type, Integer sort, Integer parentId, String createId, Date createDate, String updateId, Date updateDate, String remarks, List<CourseClass> children) {
        this.id = id;
        this.title = title;
        this.type = type;
        this.sort = sort;
        this.parentId = parentId;
        this.createId = createId;
        this.createDate = createDate;
        this.updateId = updateId;
        this.updateDate = updateDate;
        this.remarks = remarks;
        this.children = children;
    }
}
